home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / admin / accounts / adduser.rea < prev    next >
Text File  |  1996-11-17  |  3KB  |  62 lines

  1. Adduser-1.0 by Craig Hagan (Modified a lot by Chris Cappuccio)
  2. --------------------------------------------------------------
  3. craig@opine.cs.umass.edu -/- chris@slinky.cs.umass.edu
  4.  
  5. Yet another quick and dirty hack, like the original (not error tested
  6. very much, it should work pretty good unless you fuck with it.)
  7.  
  8. For SunOS 4 & Linux (I know it runs OK under Linux, from the looks of it
  9. it should run with no problems on a Sun, who knows)
  10.  
  11. What does it do?
  12.  
  13. 0- Finds out if you are root, looks for shadow password files (we don't
  14.    support shadow, bitch if it's found), looks for SunOS NIS, and maybe
  15.    it does a few other things I forgot about... (chris)
  16. 1- Asks you for username and information on your new user
  17. 2- Makes the user's home directory and entry in password file
  18. 3- Gives them ownership of their home directory.
  19.  
  20. In this directory should be:
  21.  
  22. README      :  this file
  23. Makefile  :  the makefile to make adduser
  24. adduser.c :  the source code for our magic utility
  25. xfdes.c      :  the source for fcrypt()
  26. xfdes.h   :  structures/defines for xfdes.c
  27.  
  28. type make adduser to make the standard version, make nocrypt
  29. if you have no crypt() in your libc (strange things can happen
  30. when politics are involved)
  31.  
  32. Modifications since craig's adduser (chris)
  33. -----------------------------------
  34.  
  35. 0- Cleaned up that messy code to see if a username
  36.    was already in use. Getpw functions are pretty nice :)
  37. 1- Added a small routine to check for unused uid's, so you
  38.    don't have to bitch around with passwd and find one yourself.
  39. 2- Made it look nicer
  40. 3- Added routines to find out if we are root, if shadow password
  41.    files are present, and also to check for yellow pages (/var/yp)
  42.    and if found remind the person to make passwd under /var/yp
  43.    after the user is made.
  44. 4- Took out crypt.o that pretty much didn't work if you had no libufc
  45.    and put in a GPLed fcrypt from Killer Cracker.
  46. 5- Fixed Makefile and made changes to adduser for people who are using
  47.    the included fcrypt instead of libc crypt. (-DNO_CRYPT)
  48.  
  49. What would I like but never get around to doing  (chris)
  50. -----------------------------------------------
  51.  
  52. 0- How about some command line options that match those of useradd
  53.    that comes with shadow?
  54. 1- Some error checking, please. Usernames can't begin with -,
  55.    can't be more then 8 chars long, etc..etc..etc... Change little
  56.    things so that they match unix standards (if the idiot who invoked
  57.    adduser gave a shell 400 characters long, it will ruin /etc/passwd
  58.    cuz it can only be like 32 chars long,  blah..)
  59. 2- A moduser utility like usermod that comes with shadow...
  60. 3- /usr/skel may hold valueable files, I don't use it so I didn't
  61.    include it.
  62.